// 导出数据对象
export default {
    namespaced: true,
    // 记录数据
    state: {
        bannerList:[],
        navList:[],
        fastList:[],
        bastBanner:[],
        productList:[],
    },
    // 修改数据
    mutations: {
        setBanner(state,value){
            state.bannerList = value;
        },
        setNav(state,value){
            state.navList = value;
        },
        fastList(state,value){
            state.fastList = value;
        },
        setBastBanner(state,value){
            state.bastBanner = value;
        },
        setProduct(state,value){
            state.productList = value;
        }
    },
    // 提交修改的行为 
    actions: {
        setBannerAsync(content,value){
            content.commit('setBanner',value)
        },
        setNavAsync(content,value){
            content.commit('setNav',value)
        },
        setFastAsync(content,value){
            content.commit('fastList',value)
        },
        setBastBannerAsync(content,value){
            content.commit('setBastBanner',value)
        },
        setProductAsync(content,value){
            content.commit('setProduct',value)
        },
    }
}